package cn.com.captureNetPacket.model;


public class NetworkInfo {
private String sourceIP,destinationIP,sourceMac,destinationMac,transportLayer,networkInfoKey,reverseNetworkInfoKey;
private int sourcePort,destinationPort; private long FrameNumber;
public NetworkInfo(String sourceIP, String destinationIP, String sourceMac, String destinationMac,
		String transportLayer, int sourcePort, int destinationPort) {
	super();
	this.sourceIP = sourceIP;
	this.destinationIP = destinationIP;
	this.sourceMac = sourceMac;
	this.destinationMac = destinationMac;
	this.transportLayer = transportLayer;
	this.sourcePort = sourcePort;
	this.destinationPort = destinationPort;
	networkInfoKey=getBaseNetworkInfoKey();
	reverseNetworkInfoKey=getReverseBaseNetworkInfoKey();
}


private String  getBaseNetworkInfoKey(){
	 return transportLayer+"-"+sourceIP+":"+sourcePort+"->"+destinationIP+":"+destinationPort;
}
private String getReverseBaseNetworkInfoKey(){
  return transportLayer+"-"+destinationIP+":"+destinationPort  +"->"+sourceIP+":"+sourcePort;
}




public String getReverseNetworkInfoKey() {
	return getReverseBaseNetworkInfoKey();
}


public String getNetworkInfoKey() {
	return getBaseNetworkInfoKey();
}

 


public String getSourceIP() {
	return sourceIP;
}


public void setSourceIP(String sourceIP) {
	this.sourceIP = sourceIP;
}


public String getDestinationIP() {
	return destinationIP;
}


public void setDestinationIP(String destinationIP) {
	this.destinationIP = destinationIP;
}


public String getSourceMac() {
	return sourceMac;
}


public void setSourceMac(String sourceMac) {
	this.sourceMac = sourceMac;
}


public String getDestinationMac() {
	return destinationMac;
}


public void setDestinationMac(String destinationMac) {
	this.destinationMac = destinationMac;
}


public String getTransportLayer() {
	return transportLayer;
}


public void setTransportLayer(String transportLayer) {
	this.transportLayer = transportLayer;
}


public int getSourcePort() {
	return sourcePort;
}


public void setSourcePort(int sourcePort) {
	this.sourcePort = sourcePort;
}


public int getDestinationPort() {
	return destinationPort;
}


public void setDestinationPort(int destinationPort) {
	this.destinationPort = destinationPort;
}


public long getFrameNumber() {
	return FrameNumber;
}


public void setFrameNumber(long frameNumber) {
	FrameNumber = frameNumber;
}


}
